﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Configuration;
using System.Web.UI.WebControls;
using System.Web.Security;

public partial class Login : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
      
    }
     protected void Login1_LoggedIn(object sender, EventArgs e)
    {
        
        MembershipUser user = Membership.GetUser(Login1.UserName);
        Session["Username"]=Login1.UserName;
       
        //if (Roles.IsUserInRole(user.UserName, "Admin") == true)
        //{
        // Login1.DestinationPageUrl= @"~\User\Admin\Admin.aspx";
        //}
        //if (Roles.IsUserInRole(user.UserName, "Advisor") == true)
        //{
        //    Login1.DestinationPageUrl = (@"~\User\Advisor\Advisor.aspx");
        //}
        //if (Roles.IsUserInRole(user.UserName, "BonyadShahrestan") == true)
        //{
        //    Login1.DestinationPageUrl = (@"~\User\BonyadShahrestan\BonyadShahrestan.aspx");
        //}
        //if (Roles.IsUserInRole(user.UserName, "Employer") == true)
        //{
        //    Login1.DestinationPageUrl = (@"~\User\Employer\Employer.aspx");
        //}
        //if (Roles.IsUserInRole(user.UserName, "FourhFactor") == true)
        //{
        //    Login1.DestinationPageUrl = (@"~\User\FourhFactor\FourhFactor.aspx");

        //}
        //if (Roles.IsUserInRole(user.UserName, "Surveyor") == true)
        //{
        //    Login1.DestinationPageUrl = (@"~\User\Surveyor\Surveyor.aspx");
        
        //}
         
    }
}